const app = getApp()
Page({
    data: {
        sendTime: '',
        content: '',
        mid: '',
        tokenID: ''
    },
    onLoad: function(options) {
        var _this = this;
        wx.setNavigationBarTitle({
            title: options.title,
        })
        _this.setData({
            mid: options.mid,
            tokenID: app.data.tokenID
        })
        wx.request({
            url: app.data.api + 'message/readmessage',
            data: {
                "mid": _this.data.mid,
                "token": _this.data.tokenID
            },
            method: "POST",
            header: {
                'content-type': 'application/x-www-form-urlencoded'
            },
            success: function(res) {
                if (res.data.status) {
                    _this.setData({
                        content: res.data.data.content,
                        sendTime: res.data.data.sendTime
                    })
                }
            }
        })
    }
})